package com.xuerhua.yxt.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.xuerhua.yxt.model.StudentInfo;
import com.xuerhua.yxt.model.StudentOrganize;
import com.xuerhua.yxt.page.Page;
import com.xuerhua.yxt.reqVo.BaseQueryVO;
import com.xuerhua.yxt.reqVo.StudentReqVO;
import com.xuerhua.yxt.view.StudentBindView;
import com.xuerhua.yxt.view.StudentInfoView;
import com.xuerhua.yxt.view.StudentInputTotalView;
import com.xuerhua.yxt.view.StudentPersonImportView;
import com.xuerhua.yxt.view.StudentTotalView;

public interface StudentInfoMapper {

	int delByIds(List<String> list);
	
	int selectClazzStudentCount(BaseQueryVO vo);
	
	int insertBatch(List<StudentInfo> list);
	
    int insertSelective(StudentInfo record);

    StudentInfo selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(StudentInfo record);
    
    int updateForVersionById(StudentInfo record);

    List<StudentInfo> selectByOpenid(String openid);
    
    List<StudentInfo> selectByPage(Page<StudentInfo> page);
    
    List<StudentPersonImportView> selectPersonImport(Page<StudentPersonImportView> page);
    
    List<StudentInfo> selectFullListByPage(Page<StudentInfo> page);
    
    List<StudentInfoView> selectByPageForBind(Page<StudentInfoView> page);
    
    List<StudentInfoView> selectByKeywordForBind(StudentReqVO reqVO);
    
    List<StudentInfoView> selectByKeyword(StudentReqVO reqVO);
    
    List<StudentOrganize> selectStudentOrganize(@Param("finishYear") Integer finishYear, @Param("schoolId")Integer schoolId);
    
    List<StudentInfo> selectListByParam(StudentReqVO record);
    
    /**
     * 查询家长匹配的学生信息
     * @param studentId 学生id
     * @param openid 家长openid
     * @return
     */
    StudentInfo selectStudentBindParent(@Param("studentId")Integer studentId, 
    		@Param("openid")String openid);
    /**
     * 根据学生ids查询学生列表
     * @param ids
     * @return
     */
    List<StudentInfo> selectListByIds(String[] ids);
    /**
     * 未信息录入的学生名单
     * @param vo
     * @return
     */
    List<StudentInfo> selectNoInputList(BaseQueryVO vo);
    /**
     * 学生信息录入统计
     * @param vo
     * @return
     */
    List<StudentInputTotalView> selectInputTotal(BaseQueryVO vo);
    /**
     * 未绑定学生统计
     * @param vo
     * @return
     */
    List<StudentBindView> selectBindTotal(BaseQueryVO vo);
    /**
     * 未绑定学生列表
     * @param vo
     * @return
     */
    List<StudentInfo> selectNoBindList(BaseQueryVO vo);
    
    List<Integer> getFullGrade();
    List<Integer> getFullClazz(Integer grade);
    
    List<StudentInfo> selectNoFaceCollectionList(BaseQueryVO vo);
    List<StudentInputTotalView> selectFaceCollectionTotal(BaseQueryVO vo);
    List<StudentTotalView> selectStudentTotal(Page<StudentTotalView> page);
}